<?php
header('content-type:text/html;charset=utf-8');
header('Access-Control-Allow-Origin: *');
require 'public_func.php';
$link=dbInitial();
// 获取分页参数
$page = 0 ;
$pageSize = 3;

if(isset($_GET["page"])) {
    $page = $_GET["page"];
}

if(isset($_GET["pageSize"])) {
    $pageSize = $_GET["pageSize"];
}

$sql="select userName,password from library.user limit " . $page . ", ". $pageSize ;
$emp=fetchAll($link, $sql);



// 将数组转成json格式
$json = json_encode($emp,JSON_UNESCAPED_UNICODE);


echo $json;
?>


